<html>
<head><meta charset="utf-8"><title>why does `chalk_ir::LifetimeData::Phantom` exist · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/why.20does.20.60chalk_ir.3A.3ALifetimeData.3A.3APhantom.60.20exist.html">why does `chalk_ir::LifetimeData::Phantom` exist</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217834470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/why%20does%20%60chalk_ir%3A%3ALifetimeData%3A%3APhantom%60%20exist/near/217834470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/why.20does.20.60chalk_ir.3A.3ALifetimeData.3A.3APhantom.60.20exist.html#217834470">(Nov 25 2020 at 01:06)</a>:</h4>
<p>Why does <code>chalk_ir::LifetimeData::Phantom</code> exist? It can't ever be constructed due to having a <code>Void</code> field (enum with no variants). Cc <a href="https://github.com/rust-lang/rust/issues/79394">#79394</a></p>



<a name="217870196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/why%20does%20%60chalk_ir%3A%3ALifetimeData%3A%3APhantom%60%20exist/near/217870196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/why.20does.20.60chalk_ir.3A.3ALifetimeData.3A.3APhantom.60.20exist.html#217870196">(Nov 25 2020 at 11:03)</a>:</h4>
<p>we want to specify the interner for <code>LifetimeData</code></p>



<a name="217870220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/why%20does%20%60chalk_ir%3A%3ALifetimeData%3A%3APhantom%60%20exist/near/217870220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/why.20does.20.60chalk_ir.3A.3ALifetimeData.3A.3APhantom.60.20exist.html#217870220">(Nov 25 2020 at 11:03)</a>:</h4>
<p>but all variants of that enum are concrete</p>



<a name="217870352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/why%20does%20%60chalk_ir%3A%3ALifetimeData%3A%3APhantom%60%20exist/near/217870352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/why.20does.20.60chalk_ir.3A.3ALifetimeData.3A.3APhantom.60.20exist.html#217870352">(Nov 25 2020 at 11:04)</a>:</h4>
<p>so this is pretty much the same as</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">IndexVec</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Idx</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">vec</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">_marker</span>: <span class="nc">fn</span><span class="p">(</span><span class="o">&amp;</span><span class="n">I</span><span class="p">),</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>